
$(function(){
	
	var parms = {
  		tplId : "storeListTpl",
  		contentId: "storeList",
  		url : storeListUrl,
  		afterLoad : bindEvent
	};
	
	juicerTpl(parms);
	
});

function bindEvent(){
	
	//绑定门店列表的条目的点击事件
	$(".store-item").click(function(){
		
		var storeName = $(this).attr("storeName");
		var storeAddress = $(this).attr("storeAddress");
		var storeTel = $(this).attr("storeTel");
		var longitude = $(this).attr("longitude");
		var latitude = $(this).attr("latitude");
		
		window.location.href = "store/storedetail.html?storeName=" + 
			storeName + "&storeAddress=" + storeAddress + "&storeTel=" + storeTel + "&longitude=" + longitude + "&latitude=" + latitude;
	});
}
